{include file="Public/header" title="修改首页背景图片"/}
<!-- 主容器 start -->
<div id="container" class="container-fluid">
    <div class="row-fluid">

        <!-- 左侧导航栏 start -->
        {include file="Public/sidebar"/}
        <!-- 左侧导航栏 end -->
        <!-- 主内容 start -->
        <div id="content" class="span10">
            <!-- 标题 start -->
            <div class="pageTit page-header">
                <h1>编辑
                    <small>首页背景信息</small>
                </h1>
                <div class="opt">
                </div>
            </div>
            <!-- 标题 end -->

            <!-- 内容区块 start -->
            <div class="formBox">
                <div class="thumbnail" style="width:65%;height: auto">
                    <img src="{$img_path}" class="img-responsive img-thumbnail" >
                </div>
                <form id="addform" action="{:U('Admin/Config/img_save')}" method="post" enctype="multipart/form-data">
                    <div class="control-group">
                        <input type="file" id="img_upload" name="img_upload">
                        <input type="button" value="上传" id="img_upload_btn">
                        <span class="Validform_checktip" id="info">{$info}</span>
                    </div>
                </form>
            </div>
            <!-- 内容区块 end -->
        </div>
        <!-- 主内容 end -->
    </div>
</div>
<script>
    $("#img_upload_btn").click(function(){
        if($("#img_upload").val())
        {
            $("#addform").submit();
        }
        else
        {
            $("#info").val("请上传图片");
        }
    });
</script>
<!-- 主容器 end -->
{include file="Public/footer"/}